#include <memory>
#include <string>
#include <iostream>

int main()
{
    std::shared_ptr<std::string> p = std::make_shared<std::string>("world");
    if(p && !p->empty())
        std::cout << "hello " << *p << std::endl;

    std::shared_ptr<int> p2(new int[2]{3,4}, [](int* p ){delete[] p;});

    std::cout << *(p2.get()) << *(p2.get()+1) << std::endl;

    return 0;
}